﻿import java.util.Scanner;
import java.util.Math;

public class Switch {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		System.out.println("请输入您的成绩:");
		int a = scanner.nextInt();
		switch(a / 10){

		case 10:
			System.out.println("完美");
			break;
		case 9:
			System.out.println("优秀");
			break;
		case 8:
			System.out.println("出色");
			break;
		case 7:
			System.out.println("还行");
			break;
		case 6: 
			System.out.println("及格");
			break;
		default:
			System.out.println("不及格");
			break;		
		}

		System.out.println("");
		System.out.println("-------------------------------------------------------------------");
		System.out.println("");
		
		System.out.println("请输入一个字母:");
		char b = scanner.next().charAt(0);
		switch (b) {

		case 'A':
			System.out.println("A是大写元音字母");
			break;
		case 'E':
			System.out.println("E是大写元音字母");
			break;
		case 'I':
			System.out.println("I是大写元音字母");
			break;
		case 'O':
			System.out.println("O是大写元音字母");
			break;
		case 'U':
			System.out.println("U是大写元音字母");
			break;
		default:
			System.out.println("识别错误");

		}

		System.out.println("");
		System.out.println("-------------------------------------------------------------------");
		System.out.println("");

		System.out.println("请输入第一个数：");
		int c = scanner.nextInt();
		System.out.println("请输入运算符");
		char d = scanner.next().charAt(0);
		System.out.println("请输入第二个数");
		int e = scanner.nextInt();
		
		switch(d){

		case '+':
			System.out.println( c  + " + " + e + " = " + (c + e));
			break;
		case '-':
			System.out.println( c  + " - " + e + " = " + (c - e));
			break;
		case '*':
			System.out.println( c  + " * " + e + " = " + (c * e));
			break;
		case '/':
			System.out.println( c  + " / " + e + " = " + (c / e));
			break;
		default:
			System.out.println("运算符输入错误");
		}
		
		System.out.println("");
		System.out.println("-------------------------------------------------------------------");
		System.out.println("");

		System.out.println("请输入星期几：");
		String week = scanner.next();

		switch(week){
		
		case "星期一":
			System.out.println("星期一吃汉堡");
			break;
		case "星期二":
			System.out.println("星期二吃炸鸡");
			break;
		case "星期三":
			System.out.println("星期三吃牛排");
			break;
		case "星期四":
			System.out.println("星期四吃法式大餐");
			break;
		case "星期五":
			System.out.println("星期五陪女朋友");
			break;
		case "星期六":
			System.out.println("星期六吃沙拉");
			break;
		case "星期日":
			System.out.println("星期日喝西北风");
			break;
		default:
			System.out.println("请按照正确格式输入，比如“星期一”");
		}
		
		System.out.println("");
		System.out.println("-------------------------------------------------------------------");
		System.out.println("");

		int f = 0;
		
		while(f < 10){
			f++;
			System.out.print("★ ");
			System.out.println( "3 * " + f + "=" +(3 * f));
		}

		System.out.println("");
		System.out.println("-------------------------------------------------------------------");
		System.out.println("");

		int i = 0;		
		int sum = 0;
		while(i < 5){
			System.out.println("请输入第" +  (i + 1) + "个数:");
			int s = scanner.nextInt();
			while(s  < 0 || s > 100){
				System.out.println("您输入的数据有误,请输入1- 100之间的数字:");
				System.out.println("请输入第" +  (i + 1) + "个数:");
				s = scanner.nextInt();
			}
			sum += s;
			i++;
		}

		System.out.println("五个数的总和为:" + sum);

		System.out.println("");
		System.out.println("-------------------------------------------------------------------");
		System.out.println("");

		int success = 1;

		while(success != 0){
			System.out.println("请输入是否对成绩满意，0为满意，任意数字为不满");
			success = scanner.nextInt();
			if (success == 0){
				System.out.println("已做完");
				return;
			}
			System.out.println("继续做");
		}

		System.out.println("");
		System.out.println("-------------------------------------------------------------------");
		System.out.println("");


        		for (int i = 2; i <= 1000; i++) {
			boolean flag = true;
			for (int j = 2; j < (int)Math.sqrt(i); j++) {
				if (i % j == 0) {
					flag = false;
					break;
				}
			}
			if (flag) {
				System.out.print(" " + i);
			}
		}

		System.out.println("");
		System.out.println("-------------------------------------------------------------------");
		System.out.println("");
		
		if(time >=2008 && time <= 2016){
			if(time % 4 == 0 || (time % 100 && time % 400)){
				System.out.println(time + "是闰年");
			}
				System.out.println(time + "是闰年");
		}
		
		System.out.println("");
		System.out.println("-------------------------------------------------------------------");
		System.out.println("");

		

		while(true){
			System.out.println("请输入星期几：");
			week = scanner.next();

			boolean flag = false;
			switch(week){
		
			case "星期一":
				System.out.println("星期一吃汉堡");
				break;
			case "星期二":
				System.out.println("星期二吃炸鸡");
				break;
			case "星期三":
				System.out.println("星期三吃牛排");
				break;
			case "星期四":
				System.out.println("星期四吃法式大餐");
				break;
			case "星期五":
				System.out.println("星期五陪女朋友");
				break;
			case "星期六":
				System.out.println("星期六吃沙拉");
				break;
			case "星期日":
				System.out.println("星期日喝西北风");
				break;
			default:
				System.out.println("请按照正确格式输入，比如“星期一”");
				flag = true;
				break;	
			}
			if(!flag) System.exit(0);
				
		}	
		
		

	}
}